package pl.edu.pk.mech.kkbus.service;

import static pl.edu.pk.mech.kkbus.staticstrings.NameEntity.NAME_ENTITY_SCHEDULE;

import org.springframework.beans.factory.annotation.Autowired;

import pl.edu.pk.mech.kkbus.model.Schedule;
import pl.edu.pk.mech.kkbus.repository.ScheduleDAO;

public class ScheduleService {
    @Autowired
    ScheduleDAO scheduleDAO;
    
    public boolean createOrUpdateSchedule(Schedule schedule) {
    	return scheduleDAO.createOrUpdate(schedule, NAME_ENTITY_SCHEDULE, scheduleDAO);
    }
    
    public Schedule getScheduleByKeyUser(long idUser) {
        return scheduleDAO.getScheduleByIdUser(idUser);
    }  
}
